home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1998 July / EnigmA AMIGA RUN 29 (1998)(G.R. Edizioni)(IT)[!][issue 1998-07 & 08].iso / recent / httx.lha / HTTX.doc.eng < prev    next >
Text File  |  1998-06-16  |  33KB  |  957 lines

  1.                                     HTTX
  2.  
  3.                            HTML to TEXT converter
  4.                          Created by Gabriele Favrin
  5.                (E-Mail: favrin@tin.it - FidoNet: 2:333/726.8)
  6.  
  7.                           Version 1.7a - June 1998
  8.  
  9.  
  10.  
  11. Index:
  12.  
  13.   1.  Utilization terms
  14.   2.  Properties of HTTX and distribution terms
  15.   3.  Introduction
  16.   4.  Hardware requirements and installation
  17.   5.  How to use
  18.       5.1 Command line parameters
  19.       5.2 External configuration
  20.   6.  Error Messages and AmigaDOS Return Codes
  21.   7.  FAQ (advices, interfacing with other programs and more)
  22.   8.  Technical informations
  23.       8.1 What is supported, what is not (yet) and implementation
  24.       8.2 Notes about ANSI conversion
  25.       8.3 Notes about conversion of <PRE>, <XMP>, <LISTING> and <SCRIPT>
  26.           contents
  27.   9.  How to contact the Author
  28.  10.  Greetings
  29.  11.  Program history
  30.  12.  Future versions
  31.  
  32.  
  33.  
  34. -----------------------------------------------------------------------------
  35.  
  36.                               *** CHILDWARE ***
  37.  
  38. This  software  is  "CHILDWARE". The author explicitly asks whoever uses this
  39. program  to  make  a  donation toward a beneficial corporate body which works
  40. helping children in some way.
  41.  
  42. If  you  don't know of any, ask at your local post office and inform yourself
  43. on how to make a donation to UNICEF.
  44.  
  45. The amount of the offer is up to you, but please do it!
  46.  
  47. -----------------------------------------------------------------------------
  48.  
  49.  
  50.  
  51. 1.  Utilization terms
  52. ---------------------
  53.  
  54. Before  running  this  program  on  your  computer, please read carefully the
  55. following  paragraph,  and  continue only if you agree with the terms written
  56. below.
  57.  
  58. THE  HTTX  AUTHOR  IS IN NO WAY RESPONSIBLE FOR MORAL AND/OR MATERIAL DAMAGES
  59. THAT  HIS PROGRAM MAY CAUSE TO PEOPLE OR THINGS. THE PROGRAMMER GAVE HIS BEST
  60. TO  LIMIT  THE  PROBLEMS THAT HTTX MAY CAUSE, BUT HE IS NOT ABLE TO GUARANTEE
  61. ITS  EFFICIENCY  IN  ALL  THE  SITUATIONS.  USING  HTTX,  YOU,  THE USER, ARE
  62. RESPONSIBLE FOR ALL MORAL, MATERIAL, CIVIL AND PENAL THINGS.
  63.  
  64.  
  65. WARNING:
  66.  
  67. Many HTML documents are under Copyright, and are not freely distributed, even
  68. if  converted  to plain text format. The author declines every responsibility
  69. in the utilization of the files generated with HTTX.
  70.  
  71.  
  72. All  of  the  programs  mentioned  in  this  document are properties of their
  73. respective owners.
  74.  
  75.  
  76.  
  77. 2.  Properties of HTTX and distribution terms
  78. ---------------------------------------------
  79.  
  80. The executable program, the source code and the ideas that are its basis are
  81. the EXCLUSIVE PROPERTY of Gabriele Favrin. All rights reserved.
  82.  
  83. HTTX is freeware, NOT public domain. It may be spread only if the executable
  84. files and the documentation remain unchanged. Distribute of the files in
  85. archive formats other from LhA is permitted, but compressing the individual
  86. files using PowerPacker or similar tools is not.
  87.  
  88. The insertion of HTTX or its parts in the cover disks of magazines is granted
  89. only by authorization from the author.
  90.  
  91. Commercial utilization of this package is exclusively granted to AmiTrix and
  92. Yvon Rozijn (AWeb).
  93.  
  94. Aminet, Fred Fish, Meeting Pearls, Amy Resource and CU Amiga Magazine staffs
  95. are authorized to include HTTX in their public domain software collections.
  96.  
  97.  
  98.  
  99. 3.  Introduction
  100. ----------------
  101.  
  102. HTTX (HTml > TXt) is a program to convert files from HTML format, used
  103. for viewing files on World Wide Web, to pure ASCII. There are analogous
  104. products, but since none had completely satisfied my needs, I started
  105. to write one myself.
  106.  
  107. I don't say this is the best or the fastest one, but surely it has some
  108. functions unpublished in similar Amiga programs till now.
  109.  
  110.  
  111.  
  112. 4.  Hardware requirements and installation
  113. ------------------------------------------
  114.  
  115. Required system:
  116. Amiga, 512K, Kickstart 2.04 (37.175) or above.
  117.  
  118. Required memory:
  119. The size of the file to convert to, and about a 15K, for buffers and other.
  120.  
  121. Install:
  122. Copy HTTX to your C: directory or a directory in your current path.
  123.  
  124.  
  125.  
  126. 5.  How to use
  127. --------------
  128.  
  129. HTTX MUST be launched from Shell.
  130.  
  131. Command syntax:
  132.  
  133. HTTX InputFile [OutputFile] [options]
  134.  
  135. The parameters in square brackets are optional. You are only required to
  136. specify a valid HTML file ("InputFile").
  137.  
  138. If there is no OutputFile specified, it defaults to 'InputFile'.txt (eg.
  139. "test.html" will be saved as "test.html.txt"). If a path is specified for
  140. OutputFile, that file will be saved to that path.
  141.  
  142. Examples:
  143.  
  144. -> HTTX data:txt/html/aboxe.html
  145.  
  146. The file "aboxe.html" will be converted and saved
  147. as "data:txt/html/aboxe.html.txt"
  148.  
  149. -> HTTX data:txt/html/aboxe.html ram:aboxe.txt
  150.  
  151. The file "aboxe.html" will be converted and saved
  152. as "ram:aboxe.txt"
  153.  
  154. -> HTTX data:txt/html/aboxe.html data:txt/
  155.  
  156. The file "aboxe.html" will be converted and saved
  157. as "data:txt/aboxe.html.txt"
  158.  
  159.  
  160.  
  161. 5.1 Command line parameters
  162. ---------------------------
  163.  
  164. HTTX offers many options to control the conversion process.
  165.  
  166.  
  167. LEN
  168.    Maximum line length of the output file.
  169.  
  170.    Default: 77 - Minimum: 15 - Maximum: 255
  171.  
  172.  
  173. INDENT or IN
  174.    Number of spaces for indentation (re-enter to the right) of the <UL>, <OL>
  175.    and <DL> lists. The specified value must allow at least two levels of
  176.    indentation regarding of the line length specified with the LEN option.
  177.  
  178.    Default: 3 - Minimum: 1 - Maximum: (LEN value - 10) / 3
  179.  
  180.  
  181. ANSI or AN
  182.    ANSI conversion of HTML styles and LINKS (HREF and NAME) and optimization
  183.    of alignment functions.
  184.  
  185.    Not to be used if the converted text will go on message areas, like
  186.    Fidonet or Usenet newsgroups.
  187.  
  188.    Please read the section 8.2 (ANSI conversion) for important
  189.    informations about ANSI sequences and general compatibility issues.
  190.  
  191.    Default: OFF (styles are not converted).
  192.  
  193.  
  194. 7BIT
  195.    Conversion of HTML entities (accent letters, symbols, and so...) to ASCII
  196.    codes lower than 128. This is required for text forwarded on nets like
  197.    FidoNet, where the character codes allowed can only range between
  198.    32 and 127.
  199.  
  200.    IMPORTANT: remember that the ANSI option adds Escape codes (ASCII 27),
  201.    forbidden on FidoNet, and strongly not recommended for a non personal use
  202.    (broadcast) of converted text.
  203.  
  204.    Default: OFF (8 bit chars are not converted).
  205.  
  206.  
  207. HRMODE or HR
  208.    HTML documents often contains the <HR> TAG, which defines a separating
  209.    line between paragraphs. HTTX allow the management of these lines in
  210.    three ways:
  211.  
  212.    HRMODE=0
  213.       No lines drawn.
  214.       It was NOHR in HTTX versions before 1.5.
  215.  
  216.    HRMODE=1
  217.       Lines are drawn using the minus "-" character.
  218.  
  219.    HRMODE=2
  220.       Lines are drawn using underlined spaces (in ANSI). This mode
  221.       generates a nicer line, but introduces ANSI codes, it is absolutely to
  222.       be avoided if the text will go on FidoNet or Usenet newsgroups.
  223.  
  224.    Default: HRMODE=1 (lines are inserted using the minus "-" character).
  225.  
  226.  
  227. NOALIGN or NA
  228.    HTTX supports (right or center) alignments of texts and separators (<HR>).
  229.  
  230.    Examples:
  231.  
  232.                                 centered text
  233.                                                            right-aligned text
  234.  
  235.    If NOALIGN option is ON, both the above lines will start on left margin,
  236.    this saves characters.
  237.  
  238.    Default: OFF (alignment is rightly converted).
  239.  
  240.  
  241. FILENOTE or FN
  242.    Saves the document title (<TITLE>) as the output file comment. Only the
  243.    first 64 characters are saved, as HTML standard.
  244.  
  245.    Default: OFF (the title is not saved as the comment, but it can still
  246.    appear inside the output file).
  247.  
  248.  
  249. SITE
  250.    Adds the specified source URL to output file.
  251.    It may be useful to know which document the file was created from.
  252.  
  253.    Example:
  254.    HTTX ram:children.html SITE=http://www.unicef.org
  255.  
  256.    will start the file with "URL  : http://www.unicef.org"
  257.  
  258.    Note: SITE has priority over GETNOTE, so specifying a site this way will
  259.    override that option if it is active.
  260.  
  261.    Default: OFF (without this option the URL will not be added).
  262.  
  263.  
  264. GETNOTE or GN
  265.    Uses the InputFile comment as the URL. This option is alternative to SITE
  266.    and is useful with files created using AWeb or other browsers which save
  267.    the URL in the comment. The AmigaDOS comment length limit is 80 chars.
  268.  
  269.    Default: OFF.
  270.  
  271.  
  272. NOHEADER or NOHEAD
  273.    Don't insert HTTX version information, title (<TITLE>) and URL in the
  274.    converted file. This option automatically turns off the SITE and GETNOTE
  275.    options if present.
  276.  
  277.    Default: OFF (HTTX version, optional title and URL may be added).
  278.  
  279.  
  280. HREF or LINK
  281.    Adds addresses of links (<A HREF> TAG).
  282.    Very useful if the document contains links that you want to keep.
  283.  
  284.    Default: OFF (links aren't added).
  285.  
  286.  
  287. IMG
  288.    Adds the ALT-text of images (<IMG> TAG) to output file.
  289.    Useful if the document contains images with descriptions.
  290.  
  291.    Default: OFF (ALT-text isn't added).
  292.  
  293.  
  294. SCRIPT
  295.    Adds the content of <SCRIPT> element, eg. JavaScript, to output file.
  296.    Note: this option adds the script itself, not its result!
  297.  
  298.    Please read the section 8.3 for important information about conversion of
  299.    this type of text.
  300.  
  301.    Default: OFF (<SCRIPT> content is skipped).
  302.  
  303.  
  304. BADHTML or BAD
  305.    Partial support for documents created outside of the HTML standards. Use
  306.    this option only if parts of the converted page are missing. Using this
  307.    option with correct HTML documents may cause unpredictable results in the
  308.    converted document.
  309.  
  310.    Default: OFF (HTTX uses standard DTD rules).
  311.  
  312.  
  313. FORCE
  314.    Forces conversion of input file without checking if it is an HTML
  315.    document.
  316.  
  317.    USE IT AT YOUR OWN RISK: conversion of normal text or binary files may
  318.    cause unpredictable results.
  319.  
  320.    Normally, HTTX considers a file valid HTML when:
  321.  
  322.    - it has an .html or .htm extension, or
  323.    - the starting TAG is <HTML>, or
  324.    - the starting TAG is <!DOCTYPE ...>
  325.  
  326.    This option must be specified if the three above conditions are false,
  327.    even if the file IS an HTML document.
  328.  
  329.    Default: OFF (automatic check of file).
  330.  
  331.  
  332. STDIO
  333.    Shows the converted file on the screen instead of saving it on disk. This
  334.    option automatically enables the QUIET option.
  335.  
  336.    Default: OFF (converted file is saved to disk).
  337.  
  338.  
  339. PRINT or PRT
  340.    Prints the document instead of displaying or saving it.
  341.  
  342.    The printer.device will convert standard ANSI codes and end-of-lines to
  343.    the ones used by the Printer set in your Preferences.
  344.  
  345.    This option should be used if you want to print the converted document,
  346.    especially if the ANSI option is enabled, because ANSI codes used for
  347.    conversion are different from the printer ones, which are more generic.
  348.  
  349.    Older versions of HTTX used a solution like "HTTX aboxe.html prt:",
  350.    which is now to avoid.
  351.  
  352.    This option automatically enables QUIET, and turns off FILENOTE and STDIO
  353.    options.
  354.  
  355.    Default: OFF (document is displayed on screen or saved to a file).
  356.  
  357.  
  358. APPEND
  359.    Normally HTTX will overwrite an existing file.
  360.  
  361.    If APPEND is ON, the converted text will be added to the end of the
  362.    specified file.
  363.  
  364.    Default: OFF (overwrite output file if it already exists).
  365.  
  366.  
  367. NOCFG
  368.    HTTX loads a default configuration from ENV:httx.prefs (if another is not
  369.    specified with the CFG option). If this option is ON, HTTX uses the default
  370.    values for the options or the parameters specified in the command.
  371.  
  372.    For more informations on external configuration, see section 5.2.
  373.  
  374.    Default: OFF (HTTX searches for default or specified configuration).
  375.  
  376.  
  377. CFG
  378.    With this option it is possible to specify the name of the configuration
  379.    file to be used by HTTX. This file MUST be located in the ENV: directory.
  380.  
  381.    This option turns NOCFG OFF.
  382.    For more informations on external configuration, see section 5.2.
  383.  
  384.    Default: OFF (HTTX loads the httx.prefs configuration file).
  385.  
  386.  
  387. INCLUDE
  388.    Using this option it is possible to include text at the start
  389.    of each output file, before the converted HTML data.
  390.  
  391.    The text file is NOT ALTERED IN ANY WAY, no 8 bit character conversion,
  392.    wordwrap, ANSI codes and so on. HTTX will not warn if 8 bit characters
  393.    are included.
  394.  
  395.    Remember this, especially if the converted text will go on message areas,
  396.    like FidoNet or Usenet newsgroups.
  397.  
  398.    Default: OFF (no text file is included in the output file).
  399.  
  400.  
  401. QUIET
  402.    Don't display any HTTX messages. This option is useful when HTTX is used
  403.    within a script.
  404.  
  405.    WARNING: if active this option also hides error messages, but the AmigaDOS
  406.    error codes are always returned.
  407.  
  408.    Default: OFF (HTTX output is displayed).
  409.  
  410.  
  411. If not specified, HTTX uses the default settings.
  412.  
  413. When conversion is finished, if QUIET option is OFF, HTTX will show:
  414.  
  415.  - the size of input and output files.
  416.  - the presence of 8 bit chars and their conversion, if active.
  417.    (relative only to HTML content, not the optional included file).
  418.  - TABs or ASCII chars less than 32 not converted because they are included
  419.    in pre-formatted text.
  420.  - non-standard HTML comments, which may make parts of document invisible.
  421.    If the converted file appears incomplete, try using BADHTML option.
  422.  
  423.  
  424.  
  425. 5.2 External configuration
  426. --------------------------
  427.  
  428. HTTX supports an external configuration, this is a text file that includes
  429. the most used options, so they do not need to be typed every time you use
  430. the program.
  431.  
  432. By default (except when NOCFG option is set, or CFG option with a different
  433. filename) HTTX searches the file "ENV:httx.prefs".
  434.  
  435. It's possible to create multiple configurations, maybe one to use for file
  436. conversion and another one to use for printing, creating different
  437. configuration files and enabling the CFG option with the name of the file (do
  438. not specify the path, it is always 'ENV:').
  439.  
  440. Example:
  441.  
  442. -> HTTX aboxe.html
  443.  
  444. Converts "aboxe.html" using default configuration (ENV:httx.prefs).
  445.  
  446. -> HTTX aboxe.html PRINT CFG=httxprt.prefs
  447.  
  448. Converts "aboxe.html" using the configuration file ENV:httxprt.prefs
  449.  
  450.  
  451.  
  452. Allowed parameters
  453. ------------------
  454.  
  455. The external configuration file supports a subset of available command line
  456. options. Each option MUST be specified in its extended form (for example
  457. ANSI, not AN, INDENT instead of IN, and so on).
  458.  
  459. The file must contain ONLY the options and their possible parameters. It's
  460. allowed to put each option on a separate line for better readability.
  461.  
  462. Available options (for description see section 5.1):
  463.  
  464. LEN      - the maximum length for output lines.
  465. INDENT   - the indentation size.
  466. ANSI     - allow the use of ANSI codes in conversion.
  467. 7BIT     - convert HTML entities with ASCII code >127 to 7 bit chars.
  468. HRMODE   - line drawing mode.
  469. NOALIGN  - ignore center and right alignment.
  470. FILENOTE - save HTML document title as the file comment.
  471. GETNOTE  - use the source file comment as URL in destination file.
  472. NOHEADER - don't insert header (HTTX version, URL and title of original
  473.            document) in the converted file.
  474. HREF     - add links (<A HREF>) to the destination file.
  475. IMG      - add ALT-Text of images to the destination file.
  476. SCRIPT   - add the content of <SCRIPT> element to the destination file.
  477. BADHTML  - partial support for badly written HTML.
  478.  
  479. Parameters specified on command line acts after the parameters specified in
  480. the configuration file. This can eventually override (or toggle twice) one or
  481. more options.
  482.  
  483. Examples:
  484.  
  485. If a configuration file has the following line:
  486.  
  487. IMG GETNOTE LEN=70
  488.  
  489. and on command line you write:
  490.  
  491. -> HTTX aboxe.html IMG
  492.  
  493. the result is IMG turned on because it's present in configuration file, but
  494. is turned off again because it's also present in command line.
  495.  
  496. -> HTTX aboxe.html LEN=74
  497.  
  498. LEN is both present in configuration file and command line, but this one
  499. overrides the previous value. LEN is now set to 74.
  500.  
  501.  
  502.  
  503. How to create an external configuration
  504. ---------------------------------------
  505.  
  506. External configuration files are in effect system variables and are located
  507. in ENVARC: directory (on disk) and ENV: (generally on RAM). So, the contents
  508. in ENV: are valid only for the current session, while the contents in ENVARC:
  509. are also valid after a reset.
  510.  
  511. To permanently save a configuration file, copy it both in ENV: and ENVARC:.
  512.  
  513. Use your favorite text editor (Ed, Cygnus Editor, GoldEd, and so on) to
  514. create your prefs file, httx.prefs is the default filename. Save it in ENV:,
  515. also save the file to ENVARC: so it will not be lost when you reboot.
  516. Temporary changes can be made by editing just the ENV: file.
  517.  
  518. HTTX configuration may be fully managed using the plugin for the AWeb WWW
  519. browser.
  520.  
  521.  
  522.  
  523. 6.  Error Messages and AmigaDOS Return Codes
  524. --------------------------------------------
  525.  
  526. When execution terminates, HTTX returns the appropriate AmigaDOS Return Code
  527. (RC), usable within scripts to determine if the conversion was successful.
  528. See your AmigaDOS handbook for a complete list of error codes.
  529.  
  530. In case of error, if QUIET is off, the appropriate AmigaDOS message will be
  531. displayed.
  532.  
  533. Following is a list of the most common errors. If the system is localized,
  534. messages are displayed in the appropriate language. See your AmigaDOS manual
  535. for further information.
  536.  
  537. Argument line invalid or too long
  538.    Arguments entered in a wrong way.
  539.  
  540. *** Break
  541.    The user has pressed Control-C keys, interrupting the conversion, and the
  542.    output file has been removed.
  543.  
  544. Not enough memory available
  545.    There is no memory available to allocate the buffers used by HTTX.
  546.    This can happen if the HTML file to convert or the text file to include
  547.    is too big or the memory is too fragmented.
  548.    Try to rebooting your Amiga.
  549.  
  550. Object not found
  551.    Specified file doesn't exist or it's not accessible.
  552.    Check file name and path.
  553.  
  554. Object is not of the required type
  555.    The input file seems not to be an HTML document.
  556.    Try using the FORCE option.
  557.  
  558.  
  559. HTTX can display other errors (in English only) due to wrong use of commands or
  560. options:
  561.  
  562.  
  563. The line length must be between 15 and 255 characters (current is NN)
  564.    The line size specified with LEN parameter is a number less than 15 or
  565.    more than 255.
  566.  
  567. Indentation size must be at least 1 (current is NN)
  568.    The indentation size must be at least one character.
  569.  
  570. With line length XX, indentation size YY, max indent level is ZZ.
  571. You must allow at least 3 indentations.
  572.    The maximum indentation level, with specified line size and indent value,
  573.    is less than 3.
  574.  
  575. HRMODE value must be 0, 1 or 2
  576.    Value set for HRMODE is not valid. It must be 0, 1 or 2.
  577.  
  578.  
  579. Finally, there are a few warnings which may be displayed. The conversion will
  580. take place but there may be situations altering the final result:
  581.  
  582.  
  583. Error in env config. HTTX will use its defaults
  584.    External configuration file has errors. HTTX will use the default settings
  585.    and the parameters passed on the command line.
  586.  
  587.    Check external configuration file (see section 5.2).
  588.  
  589. ENV config 'NAME' not found.
  590.    The configuration file specified with CFG option was not found.
  591.    HTTX will use the default settings and the parameters passed on command
  592.    line.
  593.    Remember that the configuration file must be located in ENV:. Remember
  594.    also to copy it again to ENVARC: when you edit it.
  595.  
  596. Found non-ASCII chars in preformatted text!
  597.    In a non formatted text section HTTX has found some 8 bit characters.
  598.    Do not ignore this warning if the converted text will be posted in
  599.    Fidonet conferences or Usenet newsgroups.
  600.  
  601. This file contains non standard HTML comment(s)!
  602.    File could be not completely converted, since non standard HTML comments
  603.    were found. If this is the case, try using BADHTML option.
  604.  
  605. Include file could not be added.
  606.    File specified with INCLUDE option can't be added because it doesn't
  607.    exist or it's not accessible.
  608.    Check file name and path.
  609.  
  610.  
  611.  
  612. 7.  FAQ (advises, interfacing to other programs and more)
  613. ---------------------------------------------------------
  614.  
  615. Q. "ANSI styles (bold, italic, underline, blue) stop after first line."
  616. A. See section 8.2.
  617.  
  618. Q. "Converted text isn't centered, but in the original document it is."
  619. A. This can happen if the text in a table row (<TR>) or cell (<TD>) is
  620.    defined as centered. To maintain compatibility to some programs used with
  621.    HTTX, this version doesn't yet supports alignment defined in those
  622.    elements. This will be added in future versions that will have more table
  623.    support.
  624.  
  625. Q. "Sometimes alignment doesn't work, wordwrap and lists are not correctly
  626.    formatted or HTML TAGS are shown".
  627. A. It's the text included between <PRE> TAGS. HTTX copies the text as is,
  628.    without formatting. This choice was made because often that kind of text
  629.    contains sources that the document's author probably wishes to keep as is.
  630.  
  631.    In <LISTING> and <XMP> the TAGS are leaved as they are, as specifications
  632.    for those elements define. Although its use is deprecated in HTML 4.0,
  633.    <XMP> is still largely used for examples in many documents.
  634.    eg. in the Netscape JavaScript specifications.
  635.  
  636. Q. "Some pages are not correctly converted..."
  637. A. There could be many reasons: layout based on tables (not fully supported,
  638.    see section 8.1), errors on HTML source (HTTX is quite tolerant, but there
  639.    are limits) or errors on HTTX engine. If you think the page is correct,
  640.    send me an E-mail with the URL.
  641.    (E-Mail: favrin@tin.it, FidoNet: 2:333/726.8)
  642.  
  643. Q. "How can I directly use HTTX from AWeb or Directory Opus?"
  644. A. AWeb users of version 3.1 or better can use the enclosed Arexx plugin.
  645.  
  646.    HTTX can be used from Directory Opus by creating a button configured as
  647.    follow (Directory Opus 4.12):
  648.  
  649.    New Entry/AmigaDOS:
  650.      C:HTTX {f} {d}
  651.      (replace C: with path for HTTX)
  652.  
  653.    With this configuration, a file selected from "source" directory will be
  654.    converted to text and saved to the "destination" directory.
  655.  
  656.    By activating "Do all files" flag it's possible to convert more than one
  657.    file, by selecting them and clicking the HTTX button.
  658.  
  659. Q. "I'm using a program that refers to HTTX for printing html (eg. MoreHTML).
  660.    If I install versions newer than HTTX 1.1b the printing doesn't work any
  661.    more."
  662. A. Various programs that use HTTX were written to work with version HTTX
  663.    1.1b. They use a command like "HTTX <filename> prt:" to print the
  664.    converted text. This doesn't work any more, especially if the ANSI option
  665.    is used. HTTX versions 1.5 and newer use some ANSI codes that are not
  666.    compatible with this printing method.
  667.  
  668.    A simple solution is to change the "prt:" to PRINT or PRT. Example:
  669.  
  670.    HTTX %s prt: ANSI
  671.    (as it is by default in MoreHTML)
  672.  
  673.    Becomes:
  674.  
  675.    HTTX %s PRT ANSI
  676.  
  677. Q. "How can I improve the performances of HTTX?"
  678. A. To speed up the conversion, try using a filesystem with blocks of 1024
  679.    bytes, like RAM disk. Note that if memory is almost full or fragmented,
  680.    saving to RAM disk may slow down the conversion process.
  681.  
  682.  
  683.  
  684. 8.  Technical informations
  685. --------------------------
  686.  
  687. This section talks about some thematics of HTML and its implementation in
  688. HTTX. Although reading this is not required to learn how to use HTTX, there
  689. are important informations about conversion that you should read if you plan
  690. to distribute your converted texts.
  691.  
  692.  
  693.  
  694. 8.1 What is supported, what is not (yet) and implementation
  695. -----------------------------------------------------------
  696.  
  697. Supported HTML:
  698.  
  699.  - Entities described in RFC 1866, © and ® (NHTML), numeric entities
  700.    (both decimal and hex), Win'95 numeric entities and special characters.
  701.  - Separators (<CENTER>, <DIV>, <BR>, <P>, <HR>) and font height change
  702.    (from <H1> to <H6>).
  703.  - Alignment (center and right) of text (headers and paragraphs) and
  704.    separators.
  705.  - Physical and logical styles.
  706.  - Numbered (<OL> with possible START attribute), unnumbered (<UL>) and
  707.    definition (<DL>) lists to a maximum of 255 levels.
  708.  - Document title (<TITLE>).
  709.  - Links (<HREF>), user maps and inline images (<IMG> with optional
  710.    ALT-text).
  711.  - Pre-formatted text (<PRE>, <XMP> and <LISTING>).
  712.  - Script (<SCRIPT>) content.
  713.  - Non standard use of "<" and ">" in a preformatted text (this may be
  714.    changed).
  715.  
  716. What is (not yet fully) supported:
  717.  
  718.  - Tables (<TABLE>). Currently each table cell is treated as a separate
  719.    document with its alignment, list indentation level, styles and so on.
  720.  - <APPLET> and <STYLE>: I can't see how could I support them, so I skip
  721.    them.
  722.  
  723. Implementation of the standard:
  724.  
  725.  - Unknown TAGS are ignored.
  726.  - Double spaces, trailing and leading blanks for each line are removed.
  727.  - Unprintable ASCII chars (lower than 32) are converted to spaces.
  728.  - PC EOLs (CR+LF) and MAC (CR) are converted to Amiga format (LF).
  729.  - For better readability of text in tables, <TD> is converted to a space and
  730.    <TR> TAGS are converted to EOL. Between two <TR> (a table row) a
  731.    maximum of one separator (<HR>) is shown.
  732.  - Consecutive EOLs are reduced to one EOL (except for <BR>).
  733.  
  734. These rules are followed except in <SCRIPT>, <PRE>, <LISTING> and <XMP>
  735. elements). See section 8.3 for more informations about this.
  736.  
  737.  
  738.  
  739. 8.2 Notes about ANSI conversion
  740. -------------------------------
  741.  
  742. If ANSI option is enabled HTTX uses standard ANSI escape sequences for
  743. converting HTML styles (such as bold, italic, underlined and so on...), links
  744. (rendered as underlined blue), centering and indentation of text.
  745.  
  746. The ANSI codes used are taken from standard ANSI specifications and should be
  747. supported by any program (maybe...).
  748.  
  749. These are the sequences (ESC is replaced by "\e"):
  750.  
  751. Bold        \e[1m
  752. Italic      \e[3m
  753. Underlined  \e[4m
  754. Blue        \e[33m
  755.  
  756. Multiple ANSI definition is done using the ";", ie. to set bold and italic
  757. HTTX uses "\e[1;3m".
  758.  
  759. For list indentation and text alignment, HTTX uses the cursor position
  760. sequence "\e[nnC" where nn is the number of characters to move right. This
  761. sequence is not used when printing.
  762.  
  763.  
  764. Compatibility problems:
  765.  
  766. - ANSI standard says that the end of line doesn't cause a style to stop, so
  767.   if a style is terminated after first line the problem is in the program
  768.   used to display text. Standard shell and MultiView works correctly.
  769.  
  770. - It seems that Multiview 40.8 doesn't support cursor positioning sequences.
  771.   If a page contains lists or aligned text that appears badly converted with
  772.   MultiView, try to convert it without the ANSI option or use a different
  773.   text viewer.
  774.  
  775.  
  776.  
  777. 8.3 Notes about conversion of <PRE>, <XMP>, <LISTING> and <SCRIPT> contents
  778. ---------------------------------------------------------------------------
  779.  
  780. Rules specified for implementation of the standard (section 8.1) wordwrap of
  781. text and 7 bit conversion of 8 bit characters aren't totally valid for some
  782. elements. The HTML specifications require them to be treated differently.
  783.  
  784. - <PRE> element (preformatted text)
  785.   In this mode wordwrap is not done. Parsing of HTML TAGS (except lists and
  786.   alignment) and entities is done. Numeric entities lower than 32 aren't
  787.   converted to avoid problems with uuencoded files contained in HTML pages.
  788.  
  789. - <XMP>, <LISTING> and <SCRIPT> elements.
  790.   The contents of these tags are left unchanged. No wordwrap, entities
  791.   conversion, or TAGS parsing is done at all. If the 7BIT option is used,
  792.   ASCII characters lower than 32 are converted to spaces. ASCII characters
  793.   higher than 128 are left as they are and Win'95 entities are not remapped.
  794.  
  795.   Remember this, if the converted text will go on message areas, like Fidonet
  796.   or Usenet newsgroups!
  797.  
  798.  
  799.  
  800. 9.  How to contact the Author
  801. -----------------------------
  802.  
  803. Beyond every communication, problem, bug report, advise or other things, a
  804. comment about HTTX will be appreciated, and information of actions toward
  805. corporations who takes care of children (see CHILDWARE).
  806.  
  807. E-Mail : favrin@tin.it
  808. FidoNet: 2:333/726.8
  809.  
  810. Please write me in italian or english, thank you.
  811.  
  812. HTTX support page:
  813. http://freeweb.aspide.it/free/poing/soft/httx/index.html
  814.  
  815.  
  816.  
  817. 10.  Greetings
  818. --------------
  819.  
  820. Beta testing:
  821.  
  822. Claudio Mazzuco       kirk@maya.dei.unipd.it
  823. William Parker        wparker@bill.amitrix.com
  824. Giuseppe Pasanisi     amicus@net-service.net
  825. Giuseppe Ammendolia   ryuga@freenet.hut.fi
  826. Neil Bothwick         aweb@wirenet.co.uk
  827. Marco L. Buschini     shido@mclink.it
  828.  
  829. English documentation and spell check:
  830.  
  831. Fabio Belli           zak@anturio.com
  832. William Parker        wparker@bill.amitrix.com
  833.  
  834. Beta testing of AWeb Plugin:
  835.  
  836. William Parker        wparker@bill.amitrix.com
  837. Dale Currie           dalec@zorro.amitrix.com
  838.  
  839. Very much thanks to Yvon Rozijn for having wanted HTTX inside AWeb II and for
  840. all the help he gives me!
  841.  
  842. Thanks to W. v. Oortmerssen for the splendid AmigaE, used to write HTTX.
  843.  
  844. Finally special greetings to those who wrote me about HTTX and to those who
  845. use it!
  846.  
  847.  
  848.  
  849. 11.  Program history
  850. --------------------
  851.  
  852. V1.0 (July 1996)
  853.    First public release.
  854.  
  855. V1.1 (November 1996)
  856.   +Improved speed.
  857.   +Added STDIO, QUIET, BADHTML, NOHEADER, GETNOTE options.
  858.   +Added AmigaDOS return codes support.
  859.   +Added <ADDRESS> and <LISTING> TAG support.
  860.   +Modified <BR> and <LI> management, as requested by HTML 3.2 standard.
  861.   +Rewritten entities management: now they will be converted even if they
  862.    are not closed with ";".
  863.   +Extended 7 bit conversion, now faster, more complete (almost all
  864.    characters are converted) and more accurate (no accent letters are left in
  865.    words, for example "HTTX è bello" becomes "HTTX e` bello" while
  866.    "Belphégor" will become "Belphegor".
  867.   +As popular demand, default 7BIT option is now OFF.
  868.   +Improved support for multiline comments and badly written HTML.
  869.   +Added support for TAGS or ALT-Text that contains LF or "<" and ">".
  870.   -Fixed many little aesthetical bugs in conversion (double spaces in some
  871.    cases, bad chars exiting from <PRE> and <SCRIPT> and other).
  872.   -Fixed an error that could cause a lock on file to convert.
  873.   -Fixed an error in FILENOTE option.
  874.  
  875. V1.1a (January 1997)
  876.   -Removed a stupid and rare bug in TAGS management.
  877.   -Fixed support for MAC EOLs.
  878.  
  879. V1.1b
  880.   -Fixed management of some entities.
  881.  
  882. V1.5 (May 1997)
  883.   +Speeded up very much the program, due to a complete rewrite of HTML parser
  884.    and optimization of many functions.
  885.   +Added options HRMODE, NOALIGN, PRINT, APPEND, NOCFG, CFG.
  886.   +Added alignment support (center and right) of text and separators.
  887.   +Added support for various TAGS and HTML attributes (like START in numbered
  888.    lists).
  889.   +Optimized the ANSI output.
  890.   +Added support for ANSI separators.
  891.   +Added support for external configuration.
  892.   +Improved entities support, now identified, despite of closing character.
  893.   +More clear HTTX internal error codes. Custom DOS error messages replaced with
  894.    PrintFault() of AmigaDOS.
  895.   +Added support for "HTTX source_filename destination_path".
  896.   +Improved support of separators in tables.
  897.   +Now HTTX follows with higher fidelity HTML DTD for many TAGS.
  898.   -Fixed some bugs in wordwrap.
  899.   -Fixed all signaled bugs in version 1.1b.
  900.   +... Many many other improvements!!!
  901.  
  902. V1.7 (January 1998)
  903.   +Rewritten in clearer way various important parts of the source code like
  904.    wordwrap and ANSI management.
  905.   +Made HTML parser more SGML compliant.
  906.   +Improved table support by managing each table cell as a separate document.
  907.   +Added support for hex numeric entities (&#xnn) up to 255 and Win'95
  908.    numeric entities and special characters in the range 128-159.
  909.   +Added support for <SELECT>, <XMP> and improved <LISTING> one.
  910.   +Now text into a <BLOCKQUOTE> (or <BQ>) element is indented.
  911.   +In <PRE> mode numeric entities (&#nn) lower than 32 are left as they are.
  912.   +Added options SCRIPT and INCLUDE.
  913.   +Now when option NOHEADER is used the HTTX version string is not added.
  914.   +Improved support for bad HTML coding.
  915.   +And many other things!
  916.   -Fixed various little aesthetical bugs and bugs related to bad HTML coding
  917.    in documents.
  918.   -Fixed many little problems with old wordwrap (the more relevant was that
  919.    if a line didn't contain spaces and ended with an entity, wordwrap didn't
  920.    work correctly).
  921.   -Numeric entities lower than ASCII 32 weren't converted to spaces.
  922.   -In case of bad arguments, false errors messages were displayed.
  923.   -Last character of file could be skipped in some cases.
  924.   -Various other bugs wiped out!
  925.  
  926. V1.7a (June 1998)
  927.   +Added alias PRT for PRINT.
  928.   -Fixed a dangerous bug that could cause HTTX to crash when a (too) long
  929.    line was aligned.
  930.   -Fixed an error in wordwrap that caused layout problems after some lines.
  931.  
  932.  
  933.  
  934. 12.  Future versions
  935. --------------------
  936.  
  937. HTTX is a program in continuous growth, because I daily use it, I notice
  938. lacks or possible improvements. This version will be the basis for a new even
  939. better version that will be out... soon.
  940.  
  941.  
  942.  
  943. -----------------------------------------------------------------------------
  944.  
  945.                               *** CHILDWARE ***
  946.  
  947. This  software  is  "CHILDWARE". The author explicitly asks whoever uses this
  948. program  to  make  a  donation toward a beneficial corporate body which works
  949. helping children in some way.
  950.  
  951. If  you  don't know of any, ask at your local post office and inform yourself
  952. on how to make a donation to UNICEF.
  953.  
  954. The amount of the offer is up to you, but please do it!
  955.  
  956. -----------------------------------------------------------------------------
  957.